Integrand size = 21, antiderivative size = 158 \[ \int \frac {\sin ^4(c+d x)}{a+b \tan (c+d x)} \, dx=\frac {a \left (3 a^4-6 a^2 b^2-b^4\right ) x}{8 \left (a^2+b^2\right )^3}+\frac {a^4 b \log (a \cos (c+d x)+b \sin (c+d x))}{\left (a^2+b^2\right )^3 d}+\frac {\cos ^4(c+d x) (b+a \tan (c+d x))}{4 \left (a^2+b^2\right ) d}-\frac {\cos ^2(c+d x) \left (4 b \left (2 a^2+b^2\right )+a \left (5 a^2+b^2\right ) \tan (c+d x)\right )}{8 \left (a^2+b^2\right )^2 d} \]
1/8*a*(3*a^4-6*a^2*b^2-b^4)*x/(a^2+b^2)^3+a^4*b*ln(a*cos(d*x+c)+b*sin(d*x+ c))/(a^2+b^2)^3/d+1/4*cos(d*x+c)^4*(b+a*tan(d*x+c))/(a^2+b^2)/d-1/8*cos(d* x+c)^2*(4*b*(2*a^2+b^2)+a*(5*a^2+b^2)*tan(d*x+c))/(a^2+b^2)^2/d
Time = 4.17 (sec) , antiderivative size = 249, normalized size of antiderivative = 1.58 \[ \int \frac {\sin ^4(c+d x)}{a+b \tan (c+d x)} \, dx=-\frac {2 a b \left (5 a^4+6 a^2 b^2+b^4\right ) \arctan (\tan (c+d x))+8 b^2 \left (2 a^4+3 a^2 b^2+b^4\right ) \cos ^2(c+d x)-4 b^2 \left (a^2+b^2\right )^2 \cos ^4(c+d x)+8 a^4 \left (\left (b^2+a \sqrt {-b^2}\right ) \log \left (\sqrt {-b^2}-b \tan (c+d x)\right )-2 b^2 \log (a+b \tan (c+d x))+\left (b^2-a \sqrt {-b^2}\right ) \log \left (\sqrt {-b^2}+b \tan (c+d x)\right )\right )-4 a b \left (a^2+b^2\right )^2 \cos ^3(c+d x) \sin (c+d x)+a \left (5 a^4 b+6 a^2 b^3+b^5\right ) \sin (2 (c+d x))}{16 b \left (a^2+b^2\right )^3 d} \]
-1/16*(2*a*b*(5*a^4 + 6*a^2*b^2 + b^4)*ArcTan[Tan[c + d*x]] + 8*b^2*(2*a^4 + 3*a^2*b^2 + b^4)*Cos[c + d*x]^2 - 4*b^2*(a^2 + b^2)^2*Cos[c + d*x]^4 + 8*a^4*((b^2 + a*Sqrt[-b^2])*Log[Sqrt[-b^2] - b*Tan[c + d*x]] - 2*b^2*Log[a + b*Tan[c + d*x]] + (b^2 - a*Sqrt[-b^2])*Log[Sqrt[-b^2] + b*Tan[c + d*x]] ) - 4*a*b*(a^2 + b^2)^2*Cos[c + d*x]^3*Sin[c + d*x] + a*(5*a^4*b + 6*a^2*b ^3 + b^5)*Sin[2*(c + d*x)])/(b*(a^2 + b^2)^3*d)
Time = 0.59 (sec) , antiderivative size = 241, normalized size of antiderivative = 1.53, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3042, 3999, 601, 2178, 27, 657, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sin ^4(c+d x)}{a+b \tan (c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sin (c+d x)^4}{a+b \tan (c+d x)}dx\) |
\(\Big \downarrow \) 3999 |
\(\displaystyle \frac {b \int \frac {b^4 \tan ^4(c+d x)}{(a+b \tan (c+d x)) \left (\tan ^2(c+d x) b^2+b^2\right )^3}d(b \tan (c+d x))}{d}\) |
\(\Big \downarrow \) 601 |
\(\displaystyle \frac {b \left (\frac {b^2 \left (a b \tan (c+d x)+b^2\right )}{4 \left (a^2+b^2\right ) \left (b^2 \tan ^2(c+d x)+b^2\right )^2}-\frac {\int \frac {-\frac {3 a \tan (c+d x) b^5}{a^2+b^2}-4 \tan ^2(c+d x) b^4+\frac {a^2 b^4}{a^2+b^2}}{(a+b \tan (c+d x)) \left (\tan ^2(c+d x) b^2+b^2\right )^2}d(b \tan (c+d x))}{4 b^2}\right )}{d}\) |
\(\Big \downarrow \) 2178 |
\(\displaystyle \frac {b \left (\frac {b^2 \left (a b \tan (c+d x)+b^2\right )}{4 \left (a^2+b^2\right ) \left (b^2 \tan ^2(c+d x)+b^2\right )^2}-\frac {\frac {b^2 \left (a b \left (5 a^2+b^2\right ) \tan (c+d x)+4 b^2 \left (2 a^2+b^2\right )\right )}{2 \left (a^2+b^2\right )^2 \left (b^2 \tan ^2(c+d x)+b^2\right )}-\frac {\int \frac {a b^4 \left (a \left (3 a^2-b^2\right )-b \left (5 a^2+b^2\right ) \tan (c+d x)\right )}{\left (a^2+b^2\right )^2 (a+b \tan (c+d x)) \left (\tan ^2(c+d x) b^2+b^2\right )}d(b \tan (c+d x))}{2 b^2}}{4 b^2}\right )}{d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {b \left (\frac {b^2 \left (a b \tan (c+d x)+b^2\right )}{4 \left (a^2+b^2\right ) \left (b^2 \tan ^2(c+d x)+b^2\right )^2}-\frac {\frac {b^2 \left (a b \left (5 a^2+b^2\right ) \tan (c+d x)+4 b^2 \left (2 a^2+b^2\right )\right )}{2 \left (a^2+b^2\right )^2 \left (b^2 \tan ^2(c+d x)+b^2\right )}-\frac {a b^2 \int \frac {a \left (3 a^2-b^2\right )-b \left (5 a^2+b^2\right ) \tan (c+d x)}{(a+b \tan (c+d x)) \left (\tan ^2(c+d x) b^2+b^2\right )}d(b \tan (c+d x))}{2 \left (a^2+b^2\right )^2}}{4 b^2}\right )}{d}\) |
\(\Big \downarrow \) 657 |
\(\displaystyle \frac {b \left (\frac {b^2 \left (a b \tan (c+d x)+b^2\right )}{4 \left (a^2+b^2\right ) \left (b^2 \tan ^2(c+d x)+b^2\right )^2}-\frac {\frac {b^2 \left (a b \left (5 a^2+b^2\right ) \tan (c+d x)+4 b^2 \left (2 a^2+b^2\right )\right )}{2 \left (a^2+b^2\right )^2 \left (b^2 \tan ^2(c+d x)+b^2\right )}-\frac {a b^2 \int \left (\frac {8 a^3}{\left (a^2+b^2\right ) (a+b \tan (c+d x))}+\frac {3 a^4-8 b \tan (c+d x) a^3-6 b^2 a^2-b^4}{\left (a^2+b^2\right ) \left (\tan ^2(c+d x) b^2+b^2\right )}\right )d(b \tan (c+d x))}{2 \left (a^2+b^2\right )^2}}{4 b^2}\right )}{d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {b \left (\frac {b^2 \left (a b \tan (c+d x)+b^2\right )}{4 \left (a^2+b^2\right ) \left (b^2 \tan ^2(c+d x)+b^2\right )^2}-\frac {\frac {b^2 \left (a b \left (5 a^2+b^2\right ) \tan (c+d x)+4 b^2 \left (2 a^2+b^2\right )\right )}{2 \left (a^2+b^2\right )^2 \left (b^2 \tan ^2(c+d x)+b^2\right )}-\frac {a b^2 \left (\frac {\left (3 a^4-6 a^2 b^2-b^4\right ) \arctan (\tan (c+d x))}{b \left (a^2+b^2\right )}-\frac {4 a^3 \log \left (b^2 \tan ^2(c+d x)+b^2\right )}{a^2+b^2}+\frac {8 a^3 \log (a+b \tan (c+d x))}{a^2+b^2}\right )}{2 \left (a^2+b^2\right )^2}}{4 b^2}\right )}{d}\) |
(b*((b^2*(b^2 + a*b*Tan[c + d*x]))/(4*(a^2 + b^2)*(b^2 + b^2*Tan[c + d*x]^ 2)^2) - (-1/2*(a*b^2*(((3*a^4 - 6*a^2*b^2 - b^4)*ArcTan[Tan[c + d*x]])/(b* (a^2 + b^2)) + (8*a^3*Log[a + b*Tan[c + d*x]])/(a^2 + b^2) - (4*a^3*Log[b^ 2 + b^2*Tan[c + d*x]^2])/(a^2 + b^2)))/(a^2 + b^2)^2 + (b^2*(4*b^2*(2*a^2 + b^2) + a*b*(5*a^2 + b^2)*Tan[c + d*x]))/(2*(a^2 + b^2)^2*(b^2 + b^2*Tan[ c + d*x]^2)))/(4*b^2)))/d
3.1.52.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[(x_)^(m_)*((c_) + (d_.)*(x_))^(n_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbo l] :> With[{Qx = PolynomialQuotient[x^m*(c + d*x)^n, a + b*x^2, x], e = Coe ff[PolynomialRemainder[x^m*(c + d*x)^n, a + b*x^2, x], x, 0], f = Coeff[Pol ynomialRemainder[x^m*(c + d*x)^n, a + b*x^2, x], x, 1]}, Simp[(a*f - b*e*x) *((a + b*x^2)^(p + 1)/(2*a*b*(p + 1))), x] + Simp[1/(2*a*(p + 1)) Int[(c + d*x)^n*(a + b*x^2)^(p + 1)*ExpandToSum[(2*a*(p + 1)*Qx)/(c + d*x)^n + (e* (2*p + 3))/(c + d*x)^n, x], x], x]] /; FreeQ[{a, b, c, d}, x] && IGtQ[m, 1] && LtQ[p, -1] && ILtQ[n, 0] && NeQ[b*c^2 + a*d^2, 0]
Int[(((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))^(n_.))/((a_) + (c_.)*( x_)^2), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*((f + g*x)^n/(a + c*x^ 2)), x], x] /; FreeQ[{a, c, d, e, f, g, m}, x] && IntegersQ[n]
Int[(Pq_)*((d_) + (e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] : > With[{Qx = PolynomialQuotient[(d + e*x)^m*Pq, a + b*x^2, x], R = Coeff[Po lynomialRemainder[(d + e*x)^m*Pq, a + b*x^2, x], x, 0], S = Coeff[Polynomia lRemainder[(d + e*x)^m*Pq, a + b*x^2, x], x, 1]}, Simp[(a*S - b*R*x)*((a + b*x^2)^(p + 1)/(2*a*b*(p + 1))), x] + Simp[1/(2*a*b*(p + 1)) Int[(d + e*x )^m*(a + b*x^2)^(p + 1)*ExpandToSum[(2*a*b*(p + 1)*Qx)/(d + e*x)^m + (b*R*( 2*p + 3))/(d + e*x)^m, x], x], x]] /; FreeQ[{a, b, d, e}, x] && PolyQ[Pq, x ] && NeQ[b*d^2 + a*e^2, 0] && LtQ[p, -1] && ILtQ[m, 0]
Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_ ), x_Symbol] :> Simp[b/f Subst[Int[x^m*((a + x)^n/(b^2 + x^2)^(m/2 + 1)), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x] && IntegerQ[m/2]
Time = 4.69 (sec) , antiderivative size = 208, normalized size of antiderivative = 1.32
method | result | size |
derivativedivides | \(\frac {\frac {\frac {\left (-\frac {5}{8} a^{5}-\frac {3}{4} a^{3} b^{2}-\frac {1}{8} a \,b^{4}\right ) \left (\tan ^{3}\left (d x +c \right )\right )+\left (-a^{4} b -\frac {3}{2} a^{2} b^{3}-\frac {1}{2} b^{5}\right ) \left (\tan ^{2}\left (d x +c \right )\right )+\left (-\frac {3}{8} a^{5}-\frac {1}{4} a^{3} b^{2}+\frac {1}{8} a \,b^{4}\right ) \tan \left (d x +c \right )-\frac {3 a^{4} b}{4}-a^{2} b^{3}-\frac {b^{5}}{4}}{\left (1+\tan ^{2}\left (d x +c \right )\right )^{2}}+\frac {a \left (-4 a^{3} b \ln \left (1+\tan ^{2}\left (d x +c \right )\right )+\left (3 a^{4}-6 a^{2} b^{2}-b^{4}\right ) \arctan \left (\tan \left (d x +c \right )\right )\right )}{8}}{\left (a^{2}+b^{2}\right )^{3}}+\frac {a^{4} b \ln \left (a +b \tan \left (d x +c \right )\right )}{\left (a^{2}+b^{2}\right )^{3}}}{d}\) | \(208\) |
default | \(\frac {\frac {\frac {\left (-\frac {5}{8} a^{5}-\frac {3}{4} a^{3} b^{2}-\frac {1}{8} a \,b^{4}\right ) \left (\tan ^{3}\left (d x +c \right )\right )+\left (-a^{4} b -\frac {3}{2} a^{2} b^{3}-\frac {1}{2} b^{5}\right ) \left (\tan ^{2}\left (d x +c \right )\right )+\left (-\frac {3}{8} a^{5}-\frac {1}{4} a^{3} b^{2}+\frac {1}{8} a \,b^{4}\right ) \tan \left (d x +c \right )-\frac {3 a^{4} b}{4}-a^{2} b^{3}-\frac {b^{5}}{4}}{\left (1+\tan ^{2}\left (d x +c \right )\right )^{2}}+\frac {a \left (-4 a^{3} b \ln \left (1+\tan ^{2}\left (d x +c \right )\right )+\left (3 a^{4}-6 a^{2} b^{2}-b^{4}\right ) \arctan \left (\tan \left (d x +c \right )\right )\right )}{8}}{\left (a^{2}+b^{2}\right )^{3}}+\frac {a^{4} b \ln \left (a +b \tan \left (d x +c \right )\right )}{\left (a^{2}+b^{2}\right )^{3}}}{d}\) | \(208\) |
risch | \(\frac {i a x b}{24 i b \,a^{2}-8 i b^{3}-8 a^{3}+24 a \,b^{2}}-\frac {3 a^{2} x}{8 \left (3 i b \,a^{2}-i b^{3}-a^{3}+3 a \,b^{2}\right )}+\frac {{\mathrm e}^{2 i \left (d x +c \right )} b}{16 \left (-2 i a b +a^{2}-b^{2}\right ) d}+\frac {i {\mathrm e}^{2 i \left (d x +c \right )} a}{8 \left (-2 i a b +a^{2}-b^{2}\right ) d}+\frac {{\mathrm e}^{-2 i \left (d x +c \right )} b}{16 \left (i b +a \right )^{2} d}-\frac {i {\mathrm e}^{-2 i \left (d x +c \right )} a}{8 \left (i b +a \right )^{2} d}-\frac {2 i a^{4} b x}{a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}}-\frac {2 i a^{4} b c}{d \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right )}+\frac {a^{4} b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {i b +a}{i b -a}\right )}{d \left (a^{6}+3 a^{4} b^{2}+3 a^{2} b^{4}+b^{6}\right )}-\frac {b \cos \left (4 d x +4 c \right )}{32 d \left (-a^{2}-b^{2}\right )}-\frac {a \sin \left (4 d x +4 c \right )}{32 d \left (-a^{2}-b^{2}\right )}\) | \(365\) |
1/d*(1/(a^2+b^2)^3*(((-5/8*a^5-3/4*a^3*b^2-1/8*a*b^4)*tan(d*x+c)^3+(-a^4*b -3/2*a^2*b^3-1/2*b^5)*tan(d*x+c)^2+(-3/8*a^5-1/4*a^3*b^2+1/8*a*b^4)*tan(d* x+c)-3/4*a^4*b-a^2*b^3-1/4*b^5)/(1+tan(d*x+c)^2)^2+1/8*a*(-4*a^3*b*ln(1+ta n(d*x+c)^2)+(3*a^4-6*a^2*b^2-b^4)*arctan(tan(d*x+c))))+a^4*b/(a^2+b^2)^3*l n(a+b*tan(d*x+c)))
Time = 0.28 (sec) , antiderivative size = 216, normalized size of antiderivative = 1.37 \[ \int \frac {\sin ^4(c+d x)}{a+b \tan (c+d x)} \, dx=\frac {4 \, a^{4} b \log \left (2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}\right ) + 2 \, {\left (a^{4} b + 2 \, a^{2} b^{3} + b^{5}\right )} \cos \left (d x + c\right )^{4} + {\left (3 \, a^{5} - 6 \, a^{3} b^{2} - a b^{4}\right )} d x - 4 \, {\left (2 \, a^{4} b + 3 \, a^{2} b^{3} + b^{5}\right )} \cos \left (d x + c\right )^{2} + {\left (2 \, {\left (a^{5} + 2 \, a^{3} b^{2} + a b^{4}\right )} \cos \left (d x + c\right )^{3} - {\left (5 \, a^{5} + 6 \, a^{3} b^{2} + a b^{4}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{8 \, {\left (a^{6} + 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} + b^{6}\right )} d} \]
1/8*(4*a^4*b*log(2*a*b*cos(d*x + c)*sin(d*x + c) + (a^2 - b^2)*cos(d*x + c )^2 + b^2) + 2*(a^4*b + 2*a^2*b^3 + b^5)*cos(d*x + c)^4 + (3*a^5 - 6*a^3*b ^2 - a*b^4)*d*x - 4*(2*a^4*b + 3*a^2*b^3 + b^5)*cos(d*x + c)^2 + (2*(a^5 + 2*a^3*b^2 + a*b^4)*cos(d*x + c)^3 - (5*a^5 + 6*a^3*b^2 + a*b^4)*cos(d*x + c))*sin(d*x + c))/((a^6 + 3*a^4*b^2 + 3*a^2*b^4 + b^6)*d)
Timed out. \[ \int \frac {\sin ^4(c+d x)}{a+b \tan (c+d x)} \, dx=\text {Timed out} \]
Time = 0.30 (sec) , antiderivative size = 280, normalized size of antiderivative = 1.77 \[ \int \frac {\sin ^4(c+d x)}{a+b \tan (c+d x)} \, dx=\frac {\frac {8 \, a^{4} b \log \left (b \tan \left (d x + c\right ) + a\right )}{a^{6} + 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} + b^{6}} - \frac {4 \, a^{4} b \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{a^{6} + 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} + b^{6}} + \frac {{\left (3 \, a^{5} - 6 \, a^{3} b^{2} - a b^{4}\right )} {\left (d x + c\right )}}{a^{6} + 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} + b^{6}} - \frac {{\left (5 \, a^{3} + a b^{2}\right )} \tan \left (d x + c\right )^{3} + 6 \, a^{2} b + 2 \, b^{3} + 4 \, {\left (2 \, a^{2} b + b^{3}\right )} \tan \left (d x + c\right )^{2} + {\left (3 \, a^{3} - a b^{2}\right )} \tan \left (d x + c\right )}{{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \tan \left (d x + c\right )^{4} + a^{4} + 2 \, a^{2} b^{2} + b^{4} + 2 \, {\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \tan \left (d x + c\right )^{2}}}{8 \, d} \]
1/8*(8*a^4*b*log(b*tan(d*x + c) + a)/(a^6 + 3*a^4*b^2 + 3*a^2*b^4 + b^6) - 4*a^4*b*log(tan(d*x + c)^2 + 1)/(a^6 + 3*a^4*b^2 + 3*a^2*b^4 + b^6) + (3* a^5 - 6*a^3*b^2 - a*b^4)*(d*x + c)/(a^6 + 3*a^4*b^2 + 3*a^2*b^4 + b^6) - ( (5*a^3 + a*b^2)*tan(d*x + c)^3 + 6*a^2*b + 2*b^3 + 4*(2*a^2*b + b^3)*tan(d *x + c)^2 + (3*a^3 - a*b^2)*tan(d*x + c))/((a^4 + 2*a^2*b^2 + b^4)*tan(d*x + c)^4 + a^4 + 2*a^2*b^2 + b^4 + 2*(a^4 + 2*a^2*b^2 + b^4)*tan(d*x + c)^2 ))/d
Leaf count of result is larger than twice the leaf count of optimal. 334 vs. \(2 (152) = 304\).
Time = 0.40 (sec) , antiderivative size = 334, normalized size of antiderivative = 2.11 \[ \int \frac {\sin ^4(c+d x)}{a+b \tan (c+d x)} \, dx=\frac {\frac {8 \, a^{4} b^{2} \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{a^{6} b + 3 \, a^{4} b^{3} + 3 \, a^{2} b^{5} + b^{7}} - \frac {4 \, a^{4} b \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{a^{6} + 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} + b^{6}} + \frac {{\left (3 \, a^{5} - 6 \, a^{3} b^{2} - a b^{4}\right )} {\left (d x + c\right )}}{a^{6} + 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} + b^{6}} + \frac {6 \, a^{4} b \tan \left (d x + c\right )^{4} - 5 \, a^{5} \tan \left (d x + c\right )^{3} - 6 \, a^{3} b^{2} \tan \left (d x + c\right )^{3} - a b^{4} \tan \left (d x + c\right )^{3} + 4 \, a^{4} b \tan \left (d x + c\right )^{2} - 12 \, a^{2} b^{3} \tan \left (d x + c\right )^{2} - 4 \, b^{5} \tan \left (d x + c\right )^{2} - 3 \, a^{5} \tan \left (d x + c\right ) - 2 \, a^{3} b^{2} \tan \left (d x + c\right ) + a b^{4} \tan \left (d x + c\right ) - 8 \, a^{2} b^{3} - 2 \, b^{5}}{{\left (a^{6} + 3 \, a^{4} b^{2} + 3 \, a^{2} b^{4} + b^{6}\right )} {\left (\tan \left (d x + c\right )^{2} + 1\right )}^{2}}}{8 \, d} \]
1/8*(8*a^4*b^2*log(abs(b*tan(d*x + c) + a))/(a^6*b + 3*a^4*b^3 + 3*a^2*b^5 + b^7) - 4*a^4*b*log(tan(d*x + c)^2 + 1)/(a^6 + 3*a^4*b^2 + 3*a^2*b^4 + b ^6) + (3*a^5 - 6*a^3*b^2 - a*b^4)*(d*x + c)/(a^6 + 3*a^4*b^2 + 3*a^2*b^4 + b^6) + (6*a^4*b*tan(d*x + c)^4 - 5*a^5*tan(d*x + c)^3 - 6*a^3*b^2*tan(d*x + c)^3 - a*b^4*tan(d*x + c)^3 + 4*a^4*b*tan(d*x + c)^2 - 12*a^2*b^3*tan(d *x + c)^2 - 4*b^5*tan(d*x + c)^2 - 3*a^5*tan(d*x + c) - 2*a^3*b^2*tan(d*x + c) + a*b^4*tan(d*x + c) - 8*a^2*b^3 - 2*b^5)/((a^6 + 3*a^4*b^2 + 3*a^2*b ^4 + b^6)*(tan(d*x + c)^2 + 1)^2))/d
Time = 5.20 (sec) , antiderivative size = 313, normalized size of antiderivative = 1.98 \[ \int \frac {\sin ^4(c+d x)}{a+b \tan (c+d x)} \, dx=\frac {a^4\,b\,\ln \left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )}{d\,{\left (a^2+b^2\right )}^3}-\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )-\mathrm {i}\right )\,\left (a\,b-a^2\,3{}\mathrm {i}\right )}{16\,d\,\left (-a^3-a^2\,b\,3{}\mathrm {i}+3\,a\,b^2+b^3\,1{}\mathrm {i}\right )}-\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )\,\left (-3\,a^2+a\,b\,1{}\mathrm {i}\right )}{16\,d\,\left (-a^3\,1{}\mathrm {i}-3\,a^2\,b+a\,b^2\,3{}\mathrm {i}+b^3\right )}-\frac {\frac {3\,a^2\,b+b^3}{4\,\left (a^4+2\,a^2\,b^2+b^4\right )}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^3\,\left (5\,a^3+a\,b^2\right )}{8\,\left (a^4+2\,a^2\,b^2+b^4\right )}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^2\,\left (2\,a^2\,b+b^3\right )}{2\,\left (a^4+2\,a^2\,b^2+b^4\right )}+\frac {a\,\mathrm {tan}\left (c+d\,x\right )\,\left (3\,a^2-b^2\right )}{8\,\left (a^4+2\,a^2\,b^2+b^4\right )}}{d\,\left ({\mathrm {tan}\left (c+d\,x\right )}^4+2\,{\mathrm {tan}\left (c+d\,x\right )}^2+1\right )} \]
(a^4*b*log(a + b*tan(c + d*x)))/(d*(a^2 + b^2)^3) - (log(tan(c + d*x) - 1i )*(a*b - a^2*3i))/(16*d*(3*a*b^2 - a^2*b*3i - a^3 + b^3*1i)) - (log(tan(c + d*x) + 1i)*(a*b*1i - 3*a^2))/(16*d*(a*b^2*3i - 3*a^2*b - a^3*1i + b^3)) - ((3*a^2*b + b^3)/(4*(a^4 + b^4 + 2*a^2*b^2)) + (tan(c + d*x)^3*(a*b^2 + 5*a^3))/(8*(a^4 + b^4 + 2*a^2*b^2)) + (tan(c + d*x)^2*(2*a^2*b + b^3))/(2* (a^4 + b^4 + 2*a^2*b^2)) + (a*tan(c + d*x)*(3*a^2 - b^2))/(8*(a^4 + b^4 + 2*a^2*b^2)))/(d*(2*tan(c + d*x)^2 + tan(c + d*x)^4 + 1))